package com.operate.api.operate.opinion.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.github.pagehelper.PageInfo;
import com.operate.api.base.*;
import com.operate.api.operate.banner.service.IBannerService;
import com.operate.api.operate.opinion.domain.vo.OpinionSearchVO;
import com.operate.api.operate.opinion.domain.vo.OpinionVO;
import com.operate.api.operate.opinion.service.IOpinionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api( tags = ApiIndex.OpinionController)
@RequestMapping(value = "/api/operate/opinion")
@RestController
@SaCheckLogin
public class OpinionController {


    @Autowired
    private IOpinionService service;

    @ApiOperation(value = "查询意见反馈列表")
    @GetMapping(value = "/list")
    public R<RestPage<List<OpinionVO>>> list(
            @ApiParam(value = "查询参数") @ModelAttribute OpinionSearchVO searchVO) {
        List<OpinionVO> list = service.getList(searchVO);
        RestPage restPage = new RestPage( new PageInfo(list),list);
        return new R(restPage);
    }




}
